#include <cstdio>
#include <cmath>

using namespace std;

typedef long double ld;
const int maxn=500000;

int main() {
    freopen("geometry.in", "r", stdin);
    freopen("geometry.out", "w", stdout);

    ld ax=0, ay=0;
    int n;
    scanf("%d", &n);
    for (int i=1; i<=n; i++) {
        int q;
        scanf("%d", &q);
        ld x=cos(q*(1.e-9)*M_PI)/2, y=sin(q*(1.e-9)*M_PI)/2;
        ax+=x*(n-1)*(n-2)/2, ay+=y*(n-1)*(n-2)/2;
    }

    ld t=6/((ld)n*(n-1)*(n-2));
    printf("%.16LF %.16LF\n", ax*t, ay*t);

    fclose(stdin);
    fclose(stdout);
    return 0;
}
